log using isq-pta-labor-maintables

use isq-pta-labor-law-data, replace

sort ccode1 year

//Table 3
ivpoisson gmm pta_n_net lpwt_gc  lp_polity2 lleft lstatecp lwdi_fdiin lwdi_trade lln_gdppc lwdi_gdpgr lmulti lgattwto ///
 (lcbr_labor =l2.mean_cbr_region), wmatrix(cluster ccode1) 
outreg2 using pta_labor1, label word dec(3) addtext() adds(Instrumented variable, e(instd)) replace 

//Table 4
sort ccode1 year

qui xtivreg depth_rasch_mean (l.cbr_labor_reg=l2.mean_cbr)l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year, first fe vce(conventional)
outreg2 using pta_labor2, label word dec(3)  e() replace addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Depth")
version 13.1: qui xtivreg depth_rasch_mean (l.cbr_labor=l2.mean_cbr)l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year, first fe vce(conventional)
version 13.1: xtreg l.cbr_labor l2.mean_cbr l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if e(sample)==1, fe 
outreg2 using pta_labor2, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Depth: First-stage")

 qui xtivreg  enforce01_mean (l.cbr_labor=l2.mean_cbr)l.depth_rasch_mean l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year, fe vce(conventional)
outreg2 using pta_labor2, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Enforcement") ///
sortvar(l.cbr_labor l.depth_rasch_mean l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto l2.mean_cbr)
version 13.1: qui xtivreg  enforce01_mean (l.cbr_labor=l2.mean_cbr)l.depth_rasch_mean l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year, fe vce(conventional)
version 13.1: xtreg l.cbr_labor l2.mean_cbr l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if e(sample)==1, fe
outreg2 using pta_labor2, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Enforcement:First-stage")

//Table 5
///democracies
ivpoisson gmm pta_n_net lpwt_gc lp_polity2 lleft lstatecp lwdi_fdiin lwdi_trade lln_gdppc lwdi_gdpgr lmulti lgattwto ///
 (lcbr_labor =l2.mean_cbr_region) if p_polity2>=8&p_polity2!=., wmatrix(cluster ccode1)
outreg2 using pta_labor3, label word dec(3) addtext() ctitle(Democracies) cttop()adds(Instrumented variable, e(instd)) replace 

///non-democracies
ivpoisson gmm pta_n_net lpwt_gc lp_polity2 lleft lstatecp lwdi_fdiin lwdi_trade lln_gdppc lwdi_gdpgr lmulti lgattwto ///
 (lcbr_labor =l2.mean_cbr_region) if p_polity2<8&p_polity2!=., wmatrix(cluster ccode1)
outreg2 using pta_labor3, label word dec(3) addtext() ctitle (Non-democracies) cttop() adds(Instrumented variable, e(instd)) append 
 
//Table 6
qui xtivreg  depth_rasch_mean (l.cbr_labor=l2.mean_cbr) l.pwt_gc l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if p_polity2>=8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor4, label word dec(3)  e() replace addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Depth")
version 13.1: qui xtivreg  depth_rasch_mean (l.cbr_labor=l2.mean_cbr) l.pwt_gc l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if p_polity2>=8&p_polity2!=., fe vce(conventional)
version 13.1: xtreg l.cbr_labor l2.mean_cbr l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if e(sample)==1, fe 
outreg2 using pta_labor4, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Depth: first-stage")

qui xtivreg  depth_rasch_mean (l.cbr_labor=l2.mean_cbr) l.pwt_gc  l.p_polity2 l.left l.statecap  l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if p_polity2<8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor4, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Depth")
version 13.1: qui xtivreg  depth_rasch_mean (l.cbr_labor=l2.mean_cbr) l.pwt_gc  l.p_polity2 l.left l.statecap  l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if p_polity2<8&p_polity2!=., fe vce(conventional)
version 13.1: xtreg l.cbr_labor l2.mean_cbr l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if e(sample)==1, fe 
outreg2 using pta_labor4, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Depth: first-stage")

qui xtivreg  enforce01_mean (l.cbr_labor=l2.mean_cbr) l.depth_rasch_mean  l.pwt_gc  l.p_polity2 l.left l.statecap  l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if p_polity2>=8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor4, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Enforcement")
version 13.1: qui xtivreg  enforce01_mean (l.cbr_labor=l2.mean_cbr) l.depth_rasch_mean  l.pwt_gc  l.p_polity2 l.left l.statecap  l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if p_polity2>=8&p_polity2!=., fe vce(conventional)
version 13.1: xtreg l.cbr_labor l2.mean_cbr l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if e(sample)==1, fe 
outreg2 using pta_labor4, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Enforcement: first-stage")

qui xtivreg  enforce01_mean (l.cbr_labor=l2.mean_cbr) l.depth_rasch_mean l.pwt_gc  l.p_polity2 l.left l.statecap  l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if p_polity2<8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor4, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Enforcement") 
version 13.1: qui xtivreg  enforce01_mean (l.cbr_labor=l2.mean_cbr) l.depth_rasch_mean l.pwt_gc  l.p_polity2 l.left l.statecap  l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if p_polity2<8&p_polity2!=., fe vce(conventional)
version 13.1: xtreg l.cbr_labor l2.mean_cbr l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if e(sample)==1, fe 
outreg2 using pta_labor4, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Enforcement: first-stage") ///
sortvar(l.cbr_labor l.depth_rasch_mean l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto l2.mean_cbr)

//Table 7

xtivreg  flexescape_mean (l.cbr_labor=l2.mean_cbr) l.depth_rasch_mean l.pwt_gc l.p_polity2 l.left l.statecap  l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year, fe vce(conventional)
outreg2 using pta_labor5, label word dec(3)  e() replace addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Escape")

xtivreg  flexrigid_mean (l.cbr_labor=l2.mean_cbr) l.depth_rasch_mean  l.pwt_gc  l.p_polity2 l.left l.statecap  l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr  l.multi l.gattwto i.year, fe vce(conventional)
outreg2 using pta_labor5, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Restrictions on flexibility")

///regime

xtivreg  flexescape_mean (l.cbr_labor=l2.mean_cbr) l.depth_rasch_mean l.pwt_gc l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto  i.year if oecd==0&p_polity2>=8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor5, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Escape")
xtivreg  flexescape_mean (l.cbr_labor=l2.mean_cbr) l.depth_rasch_mean l.pwt_gc  l.p_polity2 l.left l.statecap l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto  i.year if oecd==0&p_polity2<8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor5, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Escape")

xtivreg  flexrigid_mean (l.cbr_labor=l2.mean_cbr) l.depth_rasch_mean l.pwt_gc  l.p_polity2 l.left l.statecap  l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if p_polity2>=8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor5, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Democracies Restrictions on flexibility")
xtivreg  flexrigid_mean (l.cbr_labor=l2.mean_cbr)  l.depth_rasch_mean l.pwt_gc  l.p_polity2 l.left l.statecap  l.wdi_fdiin l.wdi_trade l.ln_gdppc l.wdi_gdpgr l.multi l.gattwto i.year if p_polity2<8&p_polity2!=., fe vce(conventional)
outreg2 using pta_labor5, label word dec(3)  e() append addtext(Year FE, Yes, Country FE, Yes) cttop("") noni ctitle("Non-democracies Restrictions on flexibility")

log off
